package br.com.plurianual.model.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;



@NamedQueries({
	@NamedQuery(name = "deleteOrgao.clearUnidadeOrcamentaria", query = "update UnidadeOrcamentaria a set a.orgao = null where a.orgao = :orgao"),
	@NamedQuery(name = "deleteOrgao.clearPrograma", query = "update Programa a set a.orgao = null where a.orgao = :orgao"),
	@NamedQuery(name = "deleteOrgao.clearAcao", query = "update Acao a set a.orgao = null where a.orgao = :orgao"),
})
/**
 * The persistent class for the tcons_orgao database table.
 * 
 */
@Entity
@Table(name="orgao")
public class Orgao extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="idOrgao", unique=true, nullable=false)
	private Integer idOrgao;

	@Column(name="codigoOrgao", nullable=true, length=5)
	private String codOrgao;

	@Column(name="descricaoOrgao", nullable=false, length=40)
	private String descOrgao;

	
    public Orgao() {

    }
    
	public Orgao(String descOrgao) {
		super();
		this.descOrgao = descOrgao;
	}

	public Integer getIdOrgao() {
		return this.idOrgao;
	}

	public void setIdOrgao(Integer idOrgao) {
		this.idOrgao = idOrgao;
	}

	public String getCodOrgao() {
		return this.codOrgao;
	}

	public void setCodOrgao(String codOrgao) {
		this.codOrgao = codOrgao;
	}

	public String getDescOrgao() {
		return this.descOrgao;
	}

	public void setDescOrgao(String descOrgao) {
		this.descOrgao = descOrgao;
	}

	@Override
	public Integer getId() {
		return this.getIdOrgao();
	}

	@Override
	public void setId(Integer id) {
		this.setIdOrgao(id);
	}

}